# -*- mode: python; coding: utf-8; -*-
##--------------------------------------------------------------------------##
##
## Copyright (C) 1998-2003 Markus Oberhumer <markus@oberhumer.com>
## Copyright (C) 2003 Mt. Hood Playing Card Co.
## Copyright (C) 2005-2010 Skomoroh <skomoroh@users.sourceforge.net>
## Copyright (C) 2010-2013 Jeremy Austin-Bardo <tjaustinbardo@gmail.com>
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program.  If not, see <http://www.gnu.org/licenses/>.
##
##--------------------------------------------------------------------------##
__docformat__ = 'restructuredtext en'
__all__ = []

from ... import pilelib as stack
from ...gamelib import info as gi
from ...packlib import info as cs
from .. import threepeaks

Wrap = stack.StackWrapper
GT, SL = gi.GT, gi.SL


class LeGrandeTeton(threepeaks.ThreePeaksNoScore):
    """
    Clear cards from row.

    Layout
      - row [28 pile 3 peaks, 4 high. no offset]
      - talon [1 S. no offset]
      - waste [1 E talon. no offset]

    :CVariables:
      _row_ : pysollib.stack.Stack
        .. pysollib.games.threepeaks.RowStack

        Init 1 close card, except last row. Build none. Play top.

      _talon_ : pysollib.stack.Stack
        .. pysollib.stack.WasteTalon

        Deal 1 card on _waste_. No redeals.

      _waste_ : pysollib.stack.Stack
        .. pysollib.games.golf.UD_RK_Waste (mod=13)

        Init 1 card. Build either in rank alone wrap. Play none.
    """
    __info__ = dict(id=22232, name='Le Grande Teton', category=cs.TYPE_TAROCK,
                    game_type=GT.PAIRING, decks=1, skill_level=SL.BALANCED,
                    version='0.50fc')
    __author__ = 'Mt. Hood Playing Card'
    __version__ = 7.70

PROVIDES = [LeGrandeTeton]